package com.kitom.qqmap.bean.address;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 地理/逆地理编码服务响应对象
 * @author <a href="https://gitee.com/kitom">ki_tom</a>
 * @since 2019-12-27
 */
@NoArgsConstructor
@Data
public class QQmapAddrToGeoResult implements Serializable {


    private Integer status;
    private String message;
    private Result result;

    @NoArgsConstructor
    @Data
    public static class Result {
        private String title;
        private Location location;
        private AdInfo ad_info;
        private AddressComponents address_components;
        private Double similarity;
        private Integer deviation;
        private Integer reliability;
        private Integer level;

        @NoArgsConstructor
        @Data
        public static class Location {
            private Double lng;
            private Double lat;
        }

        @NoArgsConstructor
        @Data
        public static class AdInfo {
            private String adcode;
        }

        @NoArgsConstructor
        @Data
        public static class AddressComponents {
            private String province;
            private String city;
            private String district;
            private String street;
            private String street_number;
        }
    }
}
